package com.daxidi.cn.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 支付订单表或者退款表
 * </p>
 *
 * @author wsh
 * @since 2020-11-09
 */
@ApiModel("支付订单信息表")
@Data
@EqualsAndHashCode(callSuper = false)
public class Pay implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty("")
    private Long id;

    @ApiModelProperty("订单ID")
    private Long billId;

    /**
     * 微信支付订单号
     */
    @ApiModelProperty("微信支付订单号")
    private String wepay;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @JSONField(format="yyyy-MM-dd")
    private Date createdAt;

    @ApiModelProperty("修改时间")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @JSONField(format="yyyy-MM-dd")
    private Date updatedAt;

    @ApiModelProperty("")
    private String mchId;

    /**
     * 小程序id
     */
    @ApiModelProperty("小程序id")
    private String appId;

    @ApiModelProperty("")
    private String openId;

    /**
     * 父权限id，如果是菜单、功能模块
     */
    @ApiModelProperty("父权限id，如果是菜单、功能模块")
    private String outTradeNo;

    @ApiModelProperty("")
    private String feeType;

    @ApiModelProperty("")
    private Integer totalFee;

    @ApiModelProperty("")
    private String spbillCreateIp;

    @ApiModelProperty("")
    private Date timeStart;

    @ApiModelProperty("")
    private Date timeExpire;

    @ApiModelProperty("")
    private String prepayId;

    @ApiModelProperty("")
    private String notifyUrl;

    @ApiModelProperty("")
    private String tradeType;

    @ApiModelProperty("")
    private String resultCode;

    @ApiModelProperty("")
    private String errCode;

    @ApiModelProperty("")
    private String errCodeDes;

    @ApiModelProperty("")
    private String isSubscribe;

    @ApiModelProperty("")
    private String bankType;

    @ApiModelProperty("")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    private Date timeEnd;

    @ApiModelProperty("")
    private String transactionId;


}
